<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>WinHide</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>WinHide</h1>

<p>Hides the specified window.</p>

<pre class="Syntax">WinHide [, WinTitle, WinText, ExcludeTitle, ExcludeText]</pre>
<h3>Parameters</h3>
<dl>

  <dt>WinTitle</dt>
  <dd><p>A window title or other criteria identifying the target window. See <a href="../misc/WinTitle.htm">WinTitle</a>.</p></dd>

  <dt>WinText</dt>
  <dd><p>If present, this parameter must be a substring from a single text element of the target window (as revealed by the included Window Spy utility). Hidden text elements are detected if <a href="DetectHiddenText.htm">DetectHiddenText</a> is ON.</p></dd>

  <dt>ExcludeTitle</dt>
  <dd><p>Windows whose titles include this value will not be considered.</p></dd>

  <dt>ExcludeText</dt>
  <dd><p>Windows whose text include this value will not be considered.</p></dd>

</dl>

<h3>Remarks</h3>
<p>Use <a href="WinShow.htm">WinShow</a> to unhide a hidden window (<a href="DetectHiddenWindows.htm">DetectHiddenWindows</a> can be either On or Off to do this).</p>
<p>This command operates only upon the topmost matching window except when <em>WinTitle</em> is <a href="GroupAdd.htm">ahk_group GroupName</a>, in which case all windows in the group are affected.</p>
<p>The Explorer taskbar may be hidden/shown as follows:</p>
<pre>WinHide ahk_class Shell_TrayWnd
WinShow ahk_class Shell_TrayWnd</pre>
<h3>Related</h3>
<p><a href="WinShow.htm">WinShow</a>, <a href="SetTitleMatchMode.htm">SetTitleMatchMode</a>, <a href="DetectHiddenWindows.htm">DetectHiddenWindows</a>, <a href="../misc/WinTitle.htm#LastFoundWindow">Last Found Window</a>, <a href="WinSet.htm">WinSet</a></p>
<h3>Example</h3>
<pre class="NoIndent">Run, notepad.exe
WinWait, Untitled - Notepad
Sleep, 500
WinHide <em>; use the window found above</em>
Sleep, 1000
WinShow</pre>

</body>
</html>
